<%@ Page Theme="BlueSkin" Title="LMS : Organization Tree" Language="C#" MasterPageFile="~/LmsWebSite/MasterEN.master" AutoEventWireup="true" CodeFile="OrganizationViewEN.aspx.cs" Inherits="OrganizationViewEN" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:UpdatePanel ID="up1" runat="server" >
    <ContentTemplate>
        <asp:UpdateProgress ID="uprogress1" runat="server">
            <ProgressTemplate>
            
                <div style="position:fixed;width:30px;height:30px;top:0px;right:0px;border:1px solid orange;">
                    <img src="images/loading.gif" style="width:30px;height:30px;"  alt='Loading' title='Loading'/>
                </div>
            </ProgressTemplate>
        </asp:UpdateProgress>
    
        
<table cellspacing="5" cellpadding="5" width="100%">
        <tr>
            <td align="left" class="heading">
                Organization Tree
            </td>
        </tr>
    </table>
    <br />
    
    <div class="aligning allWidth floating direction" style="margin-bottom:10px;">
        <div class="floating" style="font-size:1px;width:30px;height:1px;"></div>
        <div class="floating direction aligning" style="width:300px;">
            <asp:TextBox ID="txtSearch" runat="server" Width="300px"></asp:TextBox>
           
        </div>
        <div class="floating" style="font-size:1px;width:11px;height:1px;"></div>
        <div class="floating direction aligning" style="width:100px;">
            <asp:Button ID="btnSearch" runat="server" Text="Search" 
                onclick="btnSearch_Click" />
        
        </div>
            
        
        
        <div class="clearing"></div>
        <div class="aligning allWidth floating direction">
            <asp:GridView DataKeyNames="ID" ID="grdUsers" runat="server" style="margin:30px;" 
                AutoGenerateColumns="False" AllowPaging="True" 
                 onrowdeleting="grdUsers_RowDeleting" Font-Size="12px" 
                onpageindexchanging="grdUsers_PageIndexChanging" 
                EnableModelValidation="True">
                
                <EmptyDataTemplate>
                <div class="aligning floating direction" style="width:300px;">
                    <asp:Label ID="Label2" runat="server" Text="Label" >No Items found</asp:Label> 
                    <br />
                    <br />
                    
                </div>
                    
                </EmptyDataTemplate>
                <Columns>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="lblNameARHead" runat="server" Text="Arabic Name" Width="120px" ></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                            
                           <asp:Label ID="lblNameARItem" runat="server" Text='<%#  Eval ("NameAR") %>' Width="120px" style="margin-top:10px;margin-bottom:10px;"></asp:Label>
                                                     
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="lblNameENHead" runat="server" Text="English Name" Width="120px"></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                           <asp:Label ID="lblNameENItem" runat="server" Text='<%#  Eval ("NameEN") %>' Width="120px"></asp:Label>
                                                     
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="lblParentHead" runat="server" Text="Parent" Width="120px"></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                           <asp:Label ID="lblParentItem" runat="server" Text='<%# ((DatabaseComponent.OrgnizationChart)(Container.DataItem)).objParent.NameEN %>' Width="120px"></asp:Label>
                                                     
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                        
                            <asp:Label ID="lblChartTypeHead" runat="server" Text="Item Type" Width="120px"></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                        
                           <asp:Label ID="lblChartTypeItem" runat="server" Text='<%# ((DatabaseComponent.OrgnizationChart)(Container.DataItem)).objChartType.TypeNameEN %>' Width="120px"></asp:Label>
                                                     
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                    <asp:TemplateField>
                        <HeaderTemplate>
                                <asp:Label ID="lblActionsHead" runat="server" Text="Action" ></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                           
                                <a href='<%# "OrganizationEN.aspx?ID=" + Eval("ID").ToString()%>'>Edit</a>
                          
                                &nbsp;&nbsp;
                                
                                 <asp:LinkButton ID="lnkDelete" runat="server" CommandName="Delete" CommandArgument='<%# Container.DataItemIndex %>' OnClientClick="javascript:return confirm ('Do you really want to delete this item ?');"   Text="Delete" CausesValidation="false"></asp:LinkButton>
                                  
                                                 
                        </ItemTemplate>
                        
                        
                    </asp:TemplateField>
                    
                    
                    
                    
                    
                        
                           
                        
               
                
                
                
                </Columns>
                
                
            </asp:GridView>
        </div>
        
        
        
        
        <div class="clearing"></div>
        
        <div class="allWidth floating direction" style="text-align:right;">
            <asp:Button ID="btnNew" runat="server" Text="New" 
                style="margin-right:300px;" onclick="btnNew_Click" />
        </div>
        
        
        <div class="clearing"></div>
        
        <div class="aligning allWidth floating direction">
            <asp:Label ID="lblError" runat="server" Text="" ForeColor="Red" style="margin-left:30px;" EnableViewState ="false"></asp:Label>
            <div class="clearing"></div>
            <asp:Label ID="lblResult" runat="server" Text="" ForeColor="Green" style="margin-left:30px;" EnableViewState="false"></asp:Label>
            
            <div class="clearing"></div>
        </div>
        
        <div class="clearing"></div>
        
    </div>
    
    <div class="clearing"></div>
    </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

